<?php 
$params = Yii::app()->controller->getActionParams();
if (!empty($params)) {
    foreach($params as $key => $value) {
        if ($key == 'lang')
            $langParam = $value;
    }
}
?>

<?php
    $this->pageTitle=Yii::app()->name;
?>
<table border="1" class="cart_box" id="text_cart_box">
    <tr>
        <td colspan="3" align="center" >
            <h1 class="title_product" ><?php echo $product[0]->TENSP; ?></h1>
        </td>
    </tr>
    <tr>
        <td rowspan="5">
            <div class="content_half float_l">
        <a  href="<?php echo Yii::app()->request->baseUrl;?>/<?php echo $product[0]->HINHANH; ?>"><img class="img_detail" src="<?php echo Yii::app()->request->baseUrl;?>/images/products/<?php echo $product[0]->HINHANH; ?>" alt="Image" /></a>
            </div>
        </td>
    </tr>
    <div class="content_half float_r">
    <form action="<?php echo Yii::app()->request->baseUrl; ?>/index.php?r=cart/UpdateCart&maSp=<?php echo $product[0]->IDSP?><?php if (!empty($langParam)) echo "&lang=".$langParam; ?>" method="post">
        <tr>
            <td height="30" width="160"><?php echo Yii::t('translation', 'Price') ?>:</td>
            <td><?php echo number_format($product[0]->GIATIEN,0,'.',','); ?> VND</td>
        </tr>
        <tr>
            <td height="30"><?php echo Yii::t('translation', 'Status') ?>:</td>
            <td>
                <?php
                    if ($product[0]->SOLUONG > 0) echo Yii::t('translation', 'ForSales');
                else    echo Yii::t('translation', 'SoldOut');
                ?>
            </td>
        </tr>
        <tr>
            <td height="30"><?php echo Yii::t('translation', 'Line') ?>:</td>
            <td><?php echo $tenhang->TENHSX; ?></td>
        </tr>
        <tr><td height="30"><?php echo Yii::t('translation', 'OrderAmount') ?>:</td><td><input name="SoLuong" type="text" value="1" style="width: 20px; text-align: right" /></td></tr>
    </table>
    <div class="cleaner h20"></div>
    <input type="submit" name=submit value="<?php echo Yii::t('translation', 'Order') ?>">
    </form>
</div>
<div class="cleaner h30"></div>

<h5 class="title_product"><?php echo Yii::t('translation', 'ContactForMoreInfo') ?></h5>


<div class="cleaner h50"></div>